import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/style/base.scss';
import '@/assets/style/element.scss';
import router from './router'
import store from './store'
import directive from './directive'
import './permission'
import mixins from "@/mixins";
import '@/utils/loadMap';
import GPS from "@/utils/gps";

Vue.mixin(mixins)

import plugins from './plugins' // plugins
import {parseTime, resetForm} from '@/utils/index'
import { download } from '@/utils/request'

// 分页组件
import Pagination from "@/components/Pagination";
// 根据传入API选择
import SelectByApi from "@/components/SelectByApi";
// 图片上传组件
import ImageUpload from "@/components/ImageUpload";
// 播放器
import FlvPlayer from "@/components/FlvPlayer";
// 部门选择组件(多选)
import SelectGroups from "@/components/SelectGroups"
// 部门选择组件(单选)
import SelectGroup from "@/components/SelectGroup"
// 复选框（逗号分割）
import CheckboxGroup from "@/components/CheckboxGroup"
// 事件来源选择
import SelectEventSourceType from "@/components/SelectEventSourceType"
import SelectEventLevel from "@/components/SelectEventLevel"
// 时间范围选择
import SelectDateRange from "@/components/SelectDateRange"
import Tree from "@/components/Tree"
import FileUpload from "@/components/FileUpload"

Vue.config.productionTip = false

Vue.prototype.parseTime = parseTime;
Vue.prototype.resetForm = resetForm;
Vue.prototype.GPS = GPS
Vue.prototype.download = download

Vue.use(directive)
Vue.use(ElementUI, {size: 'small',});
Vue.use(plugins)

Vue.component('Pagination', Pagination)
Vue.component('SelectByApi', SelectByApi)
Vue.component('FlvPlayer', FlvPlayer)
Vue.component('ImageUpload', ImageUpload)
Vue.component('FileUpload', FileUpload)
Vue.component('SelectGroups', SelectGroups)
Vue.component('SelectGroup', SelectGroup)
Vue.component('CheckboxGroup', CheckboxGroup)
Vue.component('SelectEventSourceType', SelectEventSourceType)
Vue.component('SelectEventLevel', SelectEventLevel)
Vue.component('SelectDateRange', SelectDateRange)
Vue.component('Tree', Tree)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
